package com.wb.mas.ui.guide;

import android.app.Application;

import androidx.annotation.NonNull;
import androidx.databinding.ObservableField;

import com.blankj.utilcode.util.NetworkUtils;
import com.wb.mas.R;
import com.wb.mas.data.DemoRepository;
import com.wb.mas.entity.GuideEntity;
import com.wb.mas.entity.RootApiBean;
import com.wb.mas.ui.main.MainActivity;
import com.wb.mas.utils.Sha1Utils;
import com.wb.mas.utils.UniqueUtils;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.functions.Consumer;
import io.reactivex.schedulers.Schedulers;
import me.goldze.mvvmhabit.base.BaseViewModel;
import me.goldze.mvvmhabit.binding.command.BindingAction;
import me.goldze.mvvmhabit.binding.command.BindingCommand;

/**
 * Copyright (C) 2018,
 * SplashViewModel
 * <p>
 * Description
 * 引导页ViewModel
 *
 * @author mwl
 * @version 1.0
 * <p>
 * Ver 1.0, 2019-04-28, yue, Create file
 */
public class GuideViewModel extends BaseViewModel<DemoRepository> {
    //banner页面数据
    public ObservableField<List<GuideEntity>> itemDatas = new ObservableField<>();


    public GuideViewModel(@NonNull Application application, DemoRepository model) {
        super(application, model);
        List<GuideEntity> guideEntities = new ArrayList<>();
        guideEntities.add(new GuideEntity(R.mipmap.ma_guide_img1, getString(R.string.guide_title1), getString(R.string.guide_content1), false));
        guideEntities.add(new GuideEntity(R.mipmap.ma_guide_img2, getString(R.string.guide_title2), getString(R.string.guide_content2), false));
        guideEntities.add(new GuideEntity(R.mipmap.ma_guide_img3, getString(R.string.guide_title3), getString(R.string.guide_content3), true));
        itemDatas.set(guideEntities);
    }

    @Override
    public void onCreate() {
        super.onCreate();
    }

    public BindingCommand goOnClickCommand = new BindingCommand(new BindingAction() {
        @Override
        public void call() {
            startActivity(MainActivity.class);
            finish();
        }
    });



}
